<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <ul class="container"></ul>
    <script>
      const users = [
        { name: '张三', age: 18, isSingle: true },
        { name: '李四', age: 19, isSingle: false },
        { name: '王五', age: 20, isSingle: true }
      ];
      const ul = document.querySelector('.container');
      users.forEach(user => {
        const li = document.createElement('li');
        li.innerHTML = `
        <div>姓名：${user.name}</div>
        <div>年龄：${user.age}</div>
        <div>是否单身：${user.isSingle}</div>
      `;
        ul.appendChild(li);
      });
    </script>
  </body>
</html>
